package com.huimingpay.transaction.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 某商户针对某一种原始支付渠道的配置参数
 * @TableName pay_channel_param
 */
@TableName(value ="pay_channel_param")
public class PayChannelParam implements Serializable {
    /**
     * 
     */
    @TableId
    private Long id;

    /**
     * 配置名称
     */
    private String channelName;

    /**
     * 商户ID
     */
    private Long merchantId;

    /**
     * 原始支付渠道编码
     */
    private String payChannel;

    /**
     * 支付参数
     */
    private String param;

    /**
     * 应用与支付渠道绑定ID
     */
    private Long appPlatformChannelId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 配置名称
     */
    public String getChannelName() {
        return channelName;
    }

    /**
     * 配置名称
     */
    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    /**
     * 商户ID
     */
    public Long getMerchantId() {
        return merchantId;
    }

    /**
     * 商户ID
     */
    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    /**
     * 原始支付渠道编码
     */
    public String getPayChannel() {
        return payChannel;
    }

    /**
     * 原始支付渠道编码
     */
    public void setPayChannel(String payChannel) {
        this.payChannel = payChannel;
    }

    /**
     * 支付参数
     */
    public String getParam() {
        return param;
    }

    /**
     * 支付参数
     */
    public void setParam(String param) {
        this.param = param;
    }

    /**
     * 应用与支付渠道绑定ID
     */
    public Long getAppPlatformChannelId() {
        return appPlatformChannelId;
    }

    /**
     * 应用与支付渠道绑定ID
     */
    public void setAppPlatformChannelId(Long appPlatformChannelId) {
        this.appPlatformChannelId = appPlatformChannelId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PayChannelParam other = (PayChannelParam) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getChannelName() == null ? other.getChannelName() == null : this.getChannelName().equals(other.getChannelName()))
            && (this.getMerchantId() == null ? other.getMerchantId() == null : this.getMerchantId().equals(other.getMerchantId()))
            && (this.getPayChannel() == null ? other.getPayChannel() == null : this.getPayChannel().equals(other.getPayChannel()))
            && (this.getParam() == null ? other.getParam() == null : this.getParam().equals(other.getParam()))
            && (this.getAppPlatformChannelId() == null ? other.getAppPlatformChannelId() == null : this.getAppPlatformChannelId().equals(other.getAppPlatformChannelId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getChannelName() == null) ? 0 : getChannelName().hashCode());
        result = prime * result + ((getMerchantId() == null) ? 0 : getMerchantId().hashCode());
        result = prime * result + ((getPayChannel() == null) ? 0 : getPayChannel().hashCode());
        result = prime * result + ((getParam() == null) ? 0 : getParam().hashCode());
        result = prime * result + ((getAppPlatformChannelId() == null) ? 0 : getAppPlatformChannelId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", channelName=").append(channelName);
        sb.append(", merchantId=").append(merchantId);
        sb.append(", payChannel=").append(payChannel);
        sb.append(", param=").append(param);
        sb.append(", appPlatformChannelId=").append(appPlatformChannelId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}